r = 1 gotaxe = 1 zombie = 1 SCREEN 12 COLOR 7, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 10 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 9) AS STRING directions(1) = "EAST" directions(2) = "WEST OR SOUTH" directions(3) = "NORTH OR WEST" directions(4) = "EAST OR WEST" directions(5) = "EAST OR SOUTH" directions(6) = "NORTH OR SOUTH" directions(7) = "NORTH OR EAST" directions(8) = "NORTH OR WEST" directions(9) = "SOUTH" PRINT "" PRINT "" PRINT "It is the first week since the infection took over. Spreading throughout the" PRINT "entire country. You thought it as nothing more then rumors and pranksters." PRINT "That was until they started hunting in hordes, feasting upon those who dared" PRINT "venture out. Then one of them bite your wife. Now you are boarded up in your" PRINT "house, waiting, and wondering just will this madness end." PRINT "" DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT PRINT PRINT " " PRINT " " PRINT " " PRINT " The Dead At Home " PRINT " " PRINT " Written by " PRINT " " PRINT " D.B. Taylor" PRINT "" PRINT " Copyright (c) 2015" PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotaxe = 1 THEN: PRINT "An axe, you were hoping not to use it." PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 3 THEN: r = 2: GOTO moved IF r = 7 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 8 THEN: r = 9: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 5 THEN: r = 4: GOTO moved IF r = 4 THEN: r = 3: GOTO moved IF r = 7 THEN: r = 8: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 2 THEN: r = 3: GOTO moved IF r = 5 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 7: GOTO moved IF r = 9 THEN: r = 8: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 2 THEN: r = 1: GOTO moved IF r = 3 THEN: r = 4: GOTO moved IF r = 4 THEN: r = 5: GOTO moved IF r = 8 THEN: r = 7: GOTO moved END IF IF (cmd$ = "USE AXE") THEN CLS PRINT "You can't...you don't want to sicken yourself with the thought" PRINT "of taking the life of the one you love." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE ZOMBIE") AND r = 9 THEN CLS PRINT "She was your Wife. Until all hell broke loose. Her skin is green" PRINT "and her eye's are pale. Almost looking like glass in a way." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE AXE") AND gotaxe = 1 THEN CLS PRINT "An axe you had bought for chopping wood." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "USE AXE") AND gotaxe = 1 AND r = 9 THEN CLS GOTO win: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "LET HER LIVE") AND r = 9 THEN CLS GOTO lose: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF moved: RETURN r1: PRINT "You are standing in the entrance way of your home. The door is" PRINT "locked shut and the groans of those creatures linger throughout" PRINT "the entire house." RETURN r2: PRINT "A sickening feeling comes over you, as you notice your wife is" PRINT "screaming...in hunger." RETURN r3: PRINT "Every so often, she mutters out a word or two. It's as if she" PRINT "knows what is about to happen to her?" RETURN r4: PRINT "The house you once shared with her, before the infection, before" PRINT "hell broke loose upon the world of the living." RETURN r5: PRINT "You've been thinking about this for days. The dread, the pain," PRINT "and guilt. They all washed over you, but you can't go on like this." RETURN r6: PRINT "A trail of blood from the hallway to what was your bedroom. Before" PRINT "you were able to trap her within the confines of the room, she took" PRINT "the dog, and ate her..." RETURN r7: PRINT "The stench of death fills the air. A swarm of flies is growing in" PRINT "numbers, feasting on the stained blood, and waiting for more." RETURN r8: PRINT "You stand before the door that covered in dried blood. Suddenly a" PRINT "wave of silence fills the home. But that's cut short by muttering" PRINT "and what sounds like crying?" RETURN r9: PRINT "You slowly open the door and see what was your wife now sitting on" PRINT "the bed. She's fully turned now...she's moving back and forth, as" PRINT "her arms are by her side, the stench is awful." RETURN win: COLOR 2, 0 CLS PRINT "Holding back the tears, you raise the axe, and before you end" PRINT "the madness. She looks upon you and lets out one final scream." PRINT "The axe comes down with such force that you split her head in" PRINT "two. Her body falls back and that is it, the nightmare is over." PRINT "Quickly, you decide now is the chance to flee and try to reach" PRINT "a military outpost of some kind. Anything, to get out of this" PRINT "dead city." PRINT DO: LOOP UNTIL INKEY$ <> "" END lose: COLOR 2, 0 CLS PRINT "You can't do it...you drop the axe on the floor and she looks" PRINT "upon you with a dead look. She stands up and slowly walks over" PRINT "to you. Crying, you open up your arms to embrace the woman that" PRINT "you love. But alas, as she comes into your arms, she feasts upon" PRINT "your flesh. In death you two will live on forever." PRINT DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "You can't leave your wife in her state. Just what kind" PRINT "of a husband would you be? Food is running out and the" PRINT "water has been cut. It's getting to risky now to venture" PRINT "outside. She wouldn't mind if I took her hand...right?" _DISPLAY END END SUB